{template 'header', 'member'}

<script type="text/javascript">c(1);</script>
<div class="tinfo">
<div class="menu">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="tab" id="add"><a href="{$AJ[file_my]}?mid={$mid}&action=add"><span>添加{$MOD[name]}</span></a></td>
{if $_userid}
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s3"><a href="{$AJ[file_my]}?mid={$mid}"><span>已发布<span class="px10">({$nums[3]})</span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s2"><a href="{$AJ[file_my]}?mid={$mid}&status=2"><span>审核中<span class="px10">({$nums[2]})</span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s1"><a href="{$AJ[file_my]}?mid={$mid}&status=1"><span>未通过<span class="px10">({$nums[1]})</span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s4"><a href="{$AJ[file_my]}?mid={$mid}&status=4"><span>已过期<span class="px10">({$nums[4]})</span></span></a></td>
<td class="tab_nav">&nbsp;</td>

{/if}
</tr>
</table>
</div>
{if $action=='add' || $action=='edit'}
<iframe src="" name="send" id="send" style="display:none;"></iframe>
<form method="post" id="dform" action="{$AJ[file_my]}" target="send" onsubmit="return check();">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="mid" value="{$mid}"/>
<input type="hidden" name="itemid" value="{$itemid}"/>
<input type="hidden" name="forward" value="{$forward}"/>
<table cellpadding="6" cellspacing="1" class="tb">
{if $status==1 && $action=='edit' && $note}
<tr>
<td class="tl">未通过原因</td>
<td class="tr f_blue">{$note}</td>
</tr>
{/if}
<tr>
<td class="tl"><span class="f_red">*</span> 信息类型</td>
<td class="tr">
{loop $TYPE $k $v}
<input type="radio" name="post[typeid]" value="{$k}" {if $k==$typeid}checked{/if} id="typeid_{$k}"/> <label for="typeid_{$k}" id="t_{$k}">{$v}</label>&nbsp;
{/loop}
</td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 信息标题</td>
<td class="tr f_gray"><input name="post[title]" type="text" id="titlename" size="50" value="{$title}"/> （2-30个字）<span id="dtitle" class="f_red"></span></td>
</tr>
{if $action=='add' && $could_color}
<tr>
<td class="tl">标题颜色</td>
<td class="tr">
{dstyle('color')}&nbsp;
设置信息标题颜色需消费 <strong class="f_red">{$MOD[credit_color]}</strong> {$AJ[credit_name]}
</td>
</tr>
{/if}
<td class="tl"><span class="f_red">*</span> 物业类型</td>
<td class="tr">{category_select('post[catid]', '选择类型', $catid, $moduleid)}</td>
</tr>
{if $CP}
<script type="text/javascript">
var property_catid = {$catid};
var property_itemid = {$itemid};
var property_admin = 0;
</script>
<script type="text/javascript" src="{AJ_STATIC}file/script/property.js"></script>
{if $itemid}<script type="text/javascript">setTimeout("load_property()", 1000);</script>{/if}
<tbody id="load_property" style="display:none;">
<tr><td></td><td></td></tr>
</tbody>
{/if}
<tr>
<td class="tl">区域</td>
<td class="tr">{if $areaid}{ajax_area_select('post[areaid]', '请选择', $areaid)}{else}{ajax_area_select('post[areaid]', '请选择', $cityid)}{/if}</td>
</tr>
<tr>
<td class="tl">户型要求</td>
<td class="tr"><select class="select" name="post[room]">
																		 						 <option value="1" {if $room==1}selected="selected"{/if}>1</option>
						 												 						 <option value="2" {if $room==2}selected="selected"{/if}>2</option>
						 												 						 <option value="3" {if $room==3}selected="selected"{/if}>3</option>
						 												 						 <option value="4" {if $room==4}selected="selected"{/if}>4</option>
						 												 						 <option value="5" {if $room==5}selected="selected"{/if}>5</option>
						 																		  <option value="6" {if $room==6}selected="selected"{/if}>5室以上</option>
						 						</select> 室<select class="select" name="post[hall]">
																		 						 <option value="0" {if $hall==0} selected="selected"{/if}>0</option>
						 												 						 <option value="1" {if $hall==1}selected="selected"{/if}>1</option>
						 												 						 <option value="2" {if $hall==2}selected="selected"{/if}>2</option>
						 												 						 <option value="3" {if $hall==3}selected="selected"{/if}>3</option>
						 												 						 <option value="4" {if $hall==4}selected="selected"{/if}>4</option>
						 												 						 <option value="5" {if $hall==5}selected="selected"{/if}>5</option>
						 												</select> 厅<select class="select" name="post[toilet]">
						 												 						 <option value="0" {if $toilet==0}selected="selected"{/if}>0</option>
						 												 						 <option value="1" {if $toilet==1}selected="selected"{/if}>1</option>
						 												 						 <option value="2" {if $toilet==2}selected="selected"{/if}>2</option>
						 												 						 <option value="3" {if $toilet==3}selected="selected"{/if}>3</option>
						 												 						 <option value="4" {if $toilet==4}selected="selected"{/if}>4</option>
						 												 						 <option value="5" {if $toilet==5}selected="selected"{/if}>5</option>
						 												 </select> 卫<select class="select" name="post[balcony]">
						 												 						 <option value="0" {if $balcony==0}selected="selected"{/if}>0</option>
						 												 						 <option value="1" {if $balcony==1}selected="selected"{/if}>1</option>
						 												 						 <option value="2" {if $balcony==2}selected="selected"{/if}>2</option>
						 												 						 <option value="3" {if $balcony==3}selected="selected"{/if}>3</option>
						 												 						 <option value="4" {if $balcony==4}selected="selected"{/if}>4</option>
						 												 						 <option value="5" {if $balcony==5}selected="selected"{/if}>5</option>
						 												 </select> 阳</td>
</tr>
<tr>
<td class="tl">价格要求</td>
<td class="tr"><input name="post[price]" type="text" size="20" value="{$price}"/>元</td>
</tr>

<tr>
<td class="tl">面积要求</td>
<td class="tr"><input name="post[houseearm]" type="text" size="10" value="{$houseearm}"/> 平方米</td>
</tr>


{if $FD}{fields_html('<td class="tl">', '<td class="tr">', $item)}{/if}
<tr>
<td class="tl">详细说明</td>
<td class="tr f_gray"><textarea name="post[content]" id="content" class="dsn">{$content}</textarea>
{deditor($moduleid, 'content', $group_editor, '98%', 350)}<br/>
1、建议您描述以下方面：产品的性能及优点、用途、售后服务、包装等；<br/>
2、为避免不必要的纠纷，请使用本企业图片；<br/>
<span id="dcontent" class="f_red"></span>
</td>
</tr>


<tr>
<td class="tl">过期时间</td>
<td class="tr f_gray">{dcalendar('post[totime]', $totime)}&nbsp;
<select onchange="Dd('posttotime').value=this.value;">
<option value="">快捷选择</option>
<option value="">长期有效</option>
<option value="{timetodate($AJ_TIME+86400*3, 3)}">3天</option>
<option value="{timetodate($AJ_TIME+86400*7, 3)}">一周</option>
<option value="{timetodate($AJ_TIME+86400*15, 3)}">半月</option>
<option value="{timetodate($AJ_TIME+86400*30, 3)}">一月</option>
<option value="{timetodate($AJ_TIME+86400*182, 3)}">半年</option>
<option value="{timetodate($AJ_TIME+86400*365, 3)}">一年</option>
</select>&nbsp;
不选表示长期有效
<span id="dposttotime" class="f_red"></span></td>
</tr>

<tr{if !$_userid} style="display:none;"{/if}>
<td class="tl">我的推荐</td>
<td class="tr">
<input type="radio" name="post[elite]" value="1"{if $elite} checked{/if}/> 是
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="post[elite]" value="0"{if !$elite} checked{/if}/> 否
</td>
</tr>
{if $action=='edit'}
			<tr>
<td class="tl">联系人</td>
<td class="tr"><input name="post[truename]" type="text" id="truename" size="15" value="{$truename}" /> <span id="dtruename" class="f_red"></span></td>
</tr>

	<tr>
<td class="tl">手机号码：</td>
<td class="tr"><input name="post[mobile]" id="mobile" type="text" size="18" value="{$mobile}"/> <span id="dmobile" class="f_red"></span></td>
</tr>
			
{else}
	<tr>
<td class="tl">联系人：</td>
<td class="tr"><input name="post[truename]" type="text" id="truename" size="15" value="{$user['truename']}" /> <span id="dtruename" class="f_red"></span></td>
</tr>
	<tr>
<td class="tl">手机号码：</td>
<td class="tr"><input name="post[mobile]" id="mobile" type="text" size="18" value="{$user['mobile']}"/> <span id="dmobile" class="f_red"></span></td>
</tr>
			
{/if}
{if $action=='add' && $could_elite}
<tr>
<td class="tl">推荐到网站首页</td>
<td class="tr">
<input type="checkbox" name="elite" value="1" onclick="if({$_credit} < {$MOD[credit_elite]}) {confirm('{$AJ[credit_name]}不足，当前余额:{$_credit}');this.checked=false;}"/>
需要上传至少1张图片，且需消费 <strong class="f_red">{$MOD[credit_elite]}</strong> {$AJ[credit_name]}
</td>
</tr>
{/if}
{if $fee_add}
<tr>
<td class="tl">发布此信息需消费</td>
<td class="tr"><span class="f_b f_red">{$fee_add}</span> {$fee_unit}</td>
</tr>
{if $fee_currency == 'money'}
<tr>
<td class="tl">{$AJ[money_name]}余额</td>
<td class="tr"><span class="f_blue f_b">{$_money}{$fee_unit}</span> <a href="charge.php?action=pay" target="_blank" class="t">[充值]</a></td>
</tr>
{else}
<tr>
<td class="tl">{$AJ[credit_name]}余额</td>
<td class="tr"><span class="f_blue f_b">{$_credit}{$fee_unit}</span> <a href="credit.php?action=buy" target="_blank" class="t">[购买]</a></td>
</tr>
{/if}
{/if}
{if $need_password}
<tr>
<td class="tl"><span class="f_red">*</span> 支付密码</td>
<td class="tr">{template 'password', 'chip'} <span id="dpassword" class="f_red"></span></td>
</tr>
{/if}
{if $need_question}
<tr>
<td class="tl"><span class="f_red">*</span> 验证问题</td>
<td class="tr">{template 'question', 'chip'} <span id="danswer" class="f_red"></span></td>
</tr>
{/if}
{if $need_captcha}
<tr>
<td class="tl"><span class="f_red">*</span> 验证码</td>
<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="f_red"></span></td>
</tr>
{/if}
{if $action=='add'}
<tr style="display:none;" id="weibo_sync">
<td class="tl">同步主题</td>
<td class="tr" id="weibo_show"></td>
</tr>
{/if}
<tr>
<td class="tl">&nbsp;</td>
<td class="tr" height="50"><input type="submit" name="submit" value=" 提 交 " class="sBtn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="sBtn" onclick="history.back(-1);"/></td>
</tr>
</table>
</form>
{load('clear.js')}
{if $action=='add'}
<script type="text/javascript">s('mid_{$mid}');m('{$action}');</script>
{else}
<script type="text/javascript">s('mid_{$mid}');m('s{$status}');</script>
{/if}
{else}
<div class="tt">
<form action="{$AJ[file_my]}">
<input type="hidden" name="mid" value="{$mid}"/>
<input type="hidden" name="status" value="{$status}"/>
&nbsp;{category_select('catid', '物业分类', $catid, $moduleid)}&nbsp;
{dselect($TYPE, 'typeid', '信息类型', $typeid)}&nbsp;
<input type="text" size="30" name="kw" value="{$kw}" title="关键词"/>&nbsp;
{$mycat_select}&nbsp;
<input type="submit" value=" 搜 索 " class="sBtn"/>
<input type="button" value=" 重 置 " class="sBtn" onclick="Go('{$AJ[file_my]}?mid={$mid}&status={$status}');"/>
</form>
</div></div>
<div class="con">
<form method="post">
<table cellpadding="0" cellspacing="0" class="tb">
<tr>
<th width="20"><input type="checkbox" onclick="checkall(this.form);"/></th>
<th>图片</th>
<th>标题</th>
<th>物业类型</th>
<th width="110">{if $timetype=='add'}添加{else}更新{/if}时间</th>
<th width="50">浏览</th>
<th width="80">管理</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td><input type="checkbox" name="itemid[]" value="{$v[itemid]}"/></td>
<td><a href="javascript:_preview('{$v[thumb]}');"><img src="{if $v[thumb]}{$v[thumb]}{else}{AJ_SKIN}image/nopic50.gif{/if}" width="50" class="thumb"/></a></td>
<td align="left" title="{$v[alt]}"><ul><li>&nbsp;{if $v[level]==1}<img src="{AJ_STATIC}{$MODULE[2][moduledir]}/image/ico_home.gif" title="网站首页推广"/> {/if}{if $v[elite]}<span class="f_red" title="公司主页推荐">[荐]</span> {/if}{if $v[status]==3}<a href="{$v[linkurl]}" target="_blank" class="t">{else}<a href="{$AJ[file_my]}?mid={$mid}&action=edit&itemid={$v[itemid]}" class="t">{/if}{$v[title]}</a>{if $v[status]==1 && $v[note]} <a href="javascript:" onclick="alert('{$v[note]}');"><img src="{AJ_STATIC}{$MODULE[2][moduledir]}/image/why.gif" title="未通过原因"/></a>{/if}</li></ul></td>
<td><a href="{$v[caturl]}" target="_blank">{$v[catname]}</a></td>
{if $timetype=='add'}
<td class="f_gray px11" title="更新时间 {timetodate($v[edittime], 5)}">{timetodate($v[addtime], 5)}</td>
{else}
<td class="f_gray px11" title="添加时间 {timetodate($v[addtime], 5)}">{timetodate($v[edittime], 5)}</td>
{/if}
<td class="f_gray px11">{$v[hits]}</td>
<td>
<a href="{$AJ[file_my]}?mid={$mid}&action=edit&itemid={$v[itemid]}"><img width="16" height="16" src="{AJ_STATIC}{$MODULE[2][moduledir]}/image/edit.png" title="修改" alt=""/></a>
{if $MG[copy]}&nbsp;<a href="{$AJ[file_my]}?mid={$mid}&action=add&itemid={$v[itemid]}&catid={$v[catid]}"><img width="16" height="16" src="{AJ_STATIC}{$MODULE[2][moduledir]}/image/new.png" title="复制信息" alt=""/></a>{/if}
{if $MG[delete]}&nbsp;<a href="{$AJ[file_my]}?mid={$mid}&action=delete&itemid={$v[itemid]}" onclick="return confirm('确定要删除吗？此操作将不可撤销');"><img width="16" height="16" src="{AJ_STATIC}{$MODULE[2][moduledir]}/image/delete.png" title="删除" alt=""/></a>{/if}
</td>
</tr>
{/loop}
</table>

{if $MG[delete] || $timetype!='add'}
<div class="btns">
{if $MG[delete]}
<span class="f_r"><input type="submit" value=" 删除选中 " class="sBtn" onclick="if(confirm('确定要删除选中{$MOD[name]}吗？')){this.form.action='?mid={$mid}&status={$status}&action=delete'}else{return false;}"/></span>
{/if}
{if $timetype!='add'}
<input type="submit" value=" 刷新选中 " class="sBtn" onclick="this.form.action='?mid={$mid}&status={$status}&action=refresh';"/>
{if $MOD[credit_refresh]}
刷新一条信息一次需消费 <strong class="f_red">{$MOD[credit_refresh]}</strong> {$AJ[credit_name]}，当{$AJ[credit_name]}不足时将不可刷新
{/if}
{/if}
</div>
{/if}
</form>
{if $MG[buy_limit] || (!$MG['fee_mode'] && $MOD[fee_add])}
<div class="limit">
{if $MG[buy_limit]}
总共可发 <span class="f_b f_red">{$MG[buy_limit]}</span> 条&nbsp;&nbsp;&nbsp;
当前已发 <span class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;
还可以发 <span class="f_b f_blue">{$limit_free}</span> 条&nbsp;&nbsp;&nbsp;
{/if}
{if !$MG['fee_mode'] && $MOD[fee_add]}
发布信息收费 <span class="f_b f_red">{$MOD[fee_add]}</span> {if $MOD[fee_currency] == 'money'}{$AJ[money_unit]}{else}{$AJ[credit_unit]}{/if}/条&nbsp;&nbsp;&nbsp;
可免费发布 <span class="f_b">{if $MG[sell_free_limit]<0}无限{else}{$MG[sell_free_limit]}{/if}</span> 条&nbsp;&nbsp;&nbsp;
{/if}
</div>
{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('mid_{$mid}');m('s{$status}');</script>
{/if}
{if $action == 'add' || $action == 'edit'}
<script type="text/javascript">
function _p() {
	if(Dd('tag').value) {
		Ds('reccate');
	}
}
function check() {
	var l;
	var f;
	f = 'catid_1';
	if(Dd(f).value == 0) {
		Dmsg('请选择所属分类', 'catid', 1);
		return false;
	}
	f = 'title';
	l = Dd(f).value.length;
	if(l < 2 || l > 30) {
		Dmsg('信息标题应为2-30字，当前已输入'+l+'字', f);
		return false;
	}
{if $MOD[upload_thumb] && $MG[upload]}
	f = 'thumb';
	l = Dd(f).value.length;
	if(l < 5) {
		Dmsg('请上传第一张产品图片', f);
		return false;
	}
{/if}
{if !$_userid}
	f = 'company';
	l = Dd(f).value.length;
	if(l < 2) {
		Dmsg('请填写公司名称', f);
		return false;
	}
	if(Dd('areaid_1').value == 0) {
		Dmsg('请选择所在地区', 'areaid');
		return false;
	}
	f = 'truename';
	l = Dd(f).value.length;
	if(l < 2) {
		Dmsg('请填写联系人', f);
		return false;
	}
	f = 'mobile';
	l = Dd(f).value.length;
	if(l < 7) {
		Dmsg('请填写手机', f);
		return false;
	}
{/if}
	{if $FD}{fields_js()}{/if}
	if(Dd('property_require') != null) {
		var ptrs = Dd('property_require').getElementsByTagName('option');
		for(var i = 0; i < ptrs.length; i++) {		
			f = 'property-'+ptrs[i].value;
			if(Dd(f).value == 0 || Dd(f).value == '') {
				Dmsg('请填写或选择'+ptrs[i].innerHTML, f);
				return false;
			}
		}
	}
{if $need_password}
	f = 'password';
	l = Dd(f).value.length;
	if(l < 6) {
		Dmsg('请填写支付密码', f);
		return false;
	}
{/if}
{if $need_question}
	f = 'answer';
	l = Dd(f).value.length;
	if(l < 1) {
		Dmsg('请填写验证问题', f);
		return false;
	}
	if(Dd('c'+f).innerHTML.indexOf('error') != -1) {
		Dd(f).focus();
		return false;
	}
{/if}
{if $need_captcha}
	f = 'captcha';
	l = Dd(f).value;
	if(!is_captcha(l)) {
		Dmsg('请填写正确的验证码', f);
		return false;
	}
	if(Dd('c'+f).innerHTML.indexOf('error') != -1) {
		Dd(f).focus();
		return false;
	}
{/if}
	return true;
}
var aijiacms_oauth = '{$EXT[oauth]}';
</script>
{/if}
{if $action=='add' && strlen($EXT[oauth]) > 1}{load('weibo.js')}{/if}
</div></div></div></div>
{template 'footer'}